@extends('backend::layout')

@section('title', '新增字典')

@section('content')
    <form method="post">
        {{ csrf_field() }}
        <div class="box box-primary">
            <div class="box-header with-border">
                <div class="col-lg-4">
                    <h3 class="box-title">新增字典</h3>
                </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body pad-10">
                <div class="col-lg-4">
                    <div class="form-group @if($errors->has('name')) has-error @endif">
                        <label class="control-label">{{ __("Name") }}</label>
                        <input class="form-control " name="name" type="text" placeholder="{{ __("Name") }}" value="{{ old('name') }}">
                        @if($errors->has('name'))
                            <span class="help-block">{{ $errors->first('name') }}</span>
                        @endif
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="form-group @if($errors->has('title')) has-error @endif">
                        <label class="control-label">{{ __("Title") }}</label>
                        <input class="form-control " name="title" type="text" placeholder="{{ __("Title") }}" value="{{ old('title') }}">
                        @if($errors->has('title'))
                            <span class="help-block">{{ $errors->first('title') }}</span>
                        @endif
                    </div>
                </div>
                <div class="col-lg-4 col-md-12">
                    <div class="form-group @if($errors->has('remark')) has-error @endif">
                        <label class="control-label">备注</label>
                        <textarea class="form-control" name="remark">{{ old('remark') }}</textarea>
                        @if($errors->has('remark'))
                            <span class="help-block">{{ $errors->first('remark') }}</span>
                        @endif
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="form-group">
                        <label class="control-label">是否系统参数</label>
                        <div class="radio">
                            <label>
                                <input type="radio" value="1" @if(old('is_system') === null || old('is_system') == 1) checked @endif name="is_system">
                                {{ __('Yes') }}
                            </label>
                        </div>
                        <div class="radio">
                            <label>
                                <input type="radio" value="0" @if(old('is_system') !== null && old('is_system') == 0) checked @endif name="is_system">
                                {{ __('No') }}
                            </label>
                        </div>
                        @if($errors->has('is_system'))
                            <span class="help-block text-danger">{{ $errors->first('is_system') }}</span>
                        @endif
                    </div>
                </div>
            </div>

            <!-- /.box-body -->
            <div class="box-footer m-b-2">
                <div class="col-lg-4">
                    <button class="btn btn-primary btn-sm" type="submit">
                        <i class="fa fa-check"></i> {{ __('Save') }}
                    </button>
                    &nbsp;&nbsp;&nbsp;
                    <a class="btn btn-default btn-sm" href="javascript:history.back(-1);">
                        <i class="fa fa-undo"></i> {{ __('Back') }}
                    </a>
                </div>
            </div>
            <!-- /.box-footer -->
        </div>
    </form>
@stop